<%--
  Created by IntelliJ IDEA.
  User: macbookpro
  Date: 2023/10/23
  Time: 23:58
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
  <title>免密登陆</title>
  <link rel="stylesheet" href="fonts-materal/css/material-design-iconic-font.min.css">
  <link rel="stylesheet" href="css/style.css">
  <script src="https://unpkg.com/coco-message/coco-message.min.js"></script>
  <link rel="shortcut icon" href="https://static.arkread.com/ark/pics/favicon/favicon.ba37640e.ico" type="image/x-icon"/>
  <link rel="mask-icon" href="https://static.arkread.com/ark/pics/favicon/safari-mask-icon.714e3ee0.svg" color="#5795aa"/>
</head>
<body>
<div class="main">
  <!-- Sing in  Form -->
  <section class="sign-in">
    <div class="container">
      <div class="signin-content">
        <div class="signin-image">
          <figure>
            <img src="images/signin-image.jpg" alt="sing up image">
          </figure>
          <a href="registration.jsp" class="signup-image-link">无账户？去创建</a>
        </div>
        <div class="signin-form">
          <h2 class="form-title">免密登陆</h2>
          <form method="post" onsubmit="return false" action="#" class="register-form"
                id="login-form">
            <div class="form-group">
              <label for="username"><i
                      class="zmdi zmdi-account material-icons-name"></i></label> <input
                    type="text" name="username" id="username"
                    placeholder="手机号" />
            </div>
            <div class="form-group">
              <%--@declare id="password"--%><label for="password"><i class="zmdi zmdi-lock"></i></label> <input class="show-off1"
                                                                                                                type="text" name="confirmCode" id="confirmCode" placeholder="验证码" />
              <button type="button" class="confirm-button" id="sendVerificationCode" onclick="startCountdown()">获取验证码</button>
            </div>
            <div class="form-group form-button">
              <input type="submit" name="signin" id="noPwdLoginBtn"
                     class="form-submit" onclick="noPwdLogin()" value="登录" />
            </div>
          </form>
          <div class="social-login">
            <span class="social-label">使用其他方式登录</span>
            <ul class="socials">
              <li><a href="#"><i
                      class="display-flex-center zmdi zmdi-facebook"></i></a></li>
              <li><a href="#"><i
                      class="display-flex-center zmdi zmdi-twitter"></i></a></li>
              <li><a href="#"><i
                      class="display-flex-center zmdi zmdi-google"></i></a></li>
            </ul>
          </div>
        </div>
      </div>
    </div>
  </section>
</div>
<!-- JS -->
<script src="js/noPwdLogin.js"></script>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>const error='<%=request.getParameter("error")%>';
const su='<%=request.getParameter("BinGo")%>'
if(error==='fail'){
  alert("账户或者密码错误，请重新输入账户和密码")
}if(error==='pleLogin'){
  alert('用户不存在，请先注册')
}if(su==='success'){
  alert('注册成功，即将为您跳转到登陆页')
}

</script>
</body>
</html>
